using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Xml;

namespace uchomeDesktop
{
    public partial class personalConfigForm : Form
    {
        public personalConfigForm()
        {
            InitializeComponent();
        }

        private void personalConfigForm_Load(object sender, EventArgs e)
        {
            uchUrlTextBox.Text = Properties.Settings.Default.uchUrl;
            intervalTextBox.Text = Properties.Settings.Default.interval;
        }

        private void saveButton_Click(object sender, EventArgs e)
        {
            Properties.Settings.Default.uchUrl = uchUrlTextBox.Text;
            Properties.Settings.Default.uchApiUrl = uchUrlTextBox.Text + "/api/xmlrpc.php";
            Properties.Settings.Default.interval = intervalTextBox.Text;
            Properties.Settings.Default.Save();
            this.Hide();
        }

        private void testButton_Click(object sender, EventArgs e)
        {
            // TODO: use muti-thread to POST remote server
            
        }
    }
}